home *** CD-ROM | disk | FTP | other *** search
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- NNNNAAAAMMMMEEEE
- QDir - Traverses directory structures and contents in a
- platform-independent way
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <qdir.h>
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
- QQQQDDDDiiiirrrr (((())))
- QQQQDDDDiiiirrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _p_a_t_h,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _n_a_m_e_F_i_l_t_e_r ==== 0000,,,, iiiinnnntttt
- ssssoooorrrrttttSSSSppppeeeecccc ==== NNNNaaaammmmeeee |||| IIIIggggnnnnoooorrrreeeeCCCCaaaasssseeee,,,, iiiinnnntttt _f_i_l_t_e_r_S_p_e_c
- QQQQDDDDiiiirrrr (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& ))))
- ~~~~QQQQDDDDiiiirrrr ()
- QQQQDDDDiiiirrrr&&&& ooooppppeeeerrrraaaattttoooorrrr==== (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& ))))
- QQQQDDDDiiiirrrr&&&& ooooppppeeeerrrraaaattttoooorrrr==== (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh ))))
- vvvvooooiiiidddd sssseeeettttPPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh ))))
- ccccoooonnnnsssstttt cccchhhhaaaarrrr**** ppppaaaatttthhhh (((()))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg aaaabbbbssssPPPPaaaatttthhhh (((()))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg ccccaaaannnnoooonnnniiiiccccaaaallllPPPPaaaatttthhhh (((()))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg ddddiiiirrrrNNNNaaaammmmeeee (((()))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg ffffiiiilllleeeePPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _f_i_l_e_N_a_m_e,,,, bbbboooooooollll _a_c_c_e_p_t_A_b_s_P_a_t_h
- ==== TTTTRRRRUUUUEEEE )))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg aaaabbbbssssFFFFiiiilllleeeePPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _f_i_l_e_N_a_m_e,,,, bbbboooooooollll
- _a_c_c_e_p_t_A_b_s_P_a_t_h ==== TTTTRRRRUUUUEEEE )))) ccccoooonnnnsssstttt
- bbbboooooooollll ccccdddd (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _d_i_r_N_a_m_e,,,, bbbboooooooollll _a_c_c_e_p_t_A_b_s_P_a_t_h ==== TTTTRRRRUUUUEEEE ))))
- bbbboooooooollll ccccddddUUUUpppp (((())))
- ccccoooonnnnsssstttt cccchhhhaaaarrrr**** nnnnaaaammmmeeeeFFFFiiiilllltttteeeerrrr (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttNNNNaaaammmmeeeeFFFFiiiilllltttteeeerrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeeeFFFFiiiilllltttteeeerrrr ))))
- FFFFiiiilllltttteeeerrrrSSSSppppeeeecccc ffffiiiilllltttteeeerrrr (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttFFFFiiiilllltttteeeerrrr (((( iiiinnnntttt ffffiiiilllltttteeeerrrrSSSSppppeeeecccc ))))
- SSSSoooorrrrttttSSSSppppeeeecccc ssssoooorrrrttttiiiinnnngggg (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttSSSSoooorrrrttttiiiinnnngggg (((( iiiinnnntttt ssssoooorrrrttttSSSSppppeeeecccc ))))
- bbbboooooooollll mmmmaaaattttcccchhhhAAAAllllllllDDDDiiiirrrrssss (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttMMMMaaaattttcccchhhhAAAAllllllllDDDDiiiirrrrssss (((( bbbboooooooollll ))))
- uuuuiiiinnnntttt ccccoooouuuunnnntttt (((()))) ccccoooonnnnsssstttt
- ccccoooonnnnsssstttt cccchhhhaaaarrrr**** ooooppppeeeerrrraaaattttoooorrrr[[[[]]]] (((( iiiinnnntttt )))) ccccoooonnnnsssstttt
- ccccoooonnnnsssstttt QQQQSSSSttttrrrrLLLLiiiisssstttt**** eeeennnnttttrrrryyyyLLLLiiiisssstttt (((( iiiinnnntttt _f_i_l_t_e_r_S_p_e_c ==== DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,,
- iiiinnnntttt _s_o_r_t_S_p_e_c ==== DDDDeeeeffffaaaauuuullllttttSSSSoooorrrrtttt )))) ccccoooonnnnsssstttt
- ccccoooonnnnsssstttt QQQQSSSSttttrrrrLLLLiiiisssstttt**** eeeennnnttttrrrryyyyLLLLiiiisssstttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _n_a_m_e_F_i_l_t_e_r,,,, iiiinnnntttt
- _f_i_l_t_e_r_S_p_e_c ==== DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt _s_o_r_t_S_p_e_c
- ccccoooonnnnsssstttt QQQQFFFFiiiilllleeeeIIIInnnnffffooooLLLLiiiisssstttt**** eeeennnnttttrrrryyyyIIIInnnnffffooooLLLLiiiisssstttt (((( iiiinnnntttt _f_i_l_t_e_r_S_p_e_c ====
- DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt _s_o_r_t_S_p_e_c ==== DDDDeeeeffffaaaauuuullllttttSSSSoooorrrrtttt )))) ccccoooonnnnsssstttt
- ccccoooonnnnsssstttt QQQQFFFFiiiilllleeeeIIIInnnnffffooooLLLLiiiisssstttt**** eeeennnnttttrrrryyyyIIIInnnnffffooooLLLLiiiisssstttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr ****
- _n_a_m_e_F_i_l_t_e_r,,,, iiiinnnntttt _f_i_l_t_e_r_S_p_e_c ==== DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt _s_o_r_t_S_p_e_c
- bbbboooooooollll mmmmkkkkddddiiiirrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _d_i_r_N_a_m_e,,,, bbbboooooooollll _a_c_c_e_p_t_A_b_s_P_a_t_h ==== TTTTRRRRUUUUEEEE
- )))) ccccoooonnnnsssstttt
- bbbboooooooollll rrrrmmmmddddiiiirrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _d_i_r_N_a_m_e,,,, bbbboooooooollll _a_c_c_e_p_t_A_b_s_P_a_t_h ==== TTTTRRRRUUUUEEEE
- )))) ccccoooonnnnsssstttt
- bbbboooooooollll iiiissssRRRReeeeaaaaddddaaaabbbblllleeee (((()))) ccccoooonnnnsssstttt
- bbbboooooooollll eeeexxxxiiiissssttttssss (((()))) ccccoooonnnnsssstttt
- bbbboooooooollll iiiissssRRRRooooooootttt (((()))) ccccoooonnnnsssstttt
- bbbboooooooollll iiiissssRRRReeeellllaaaattttiiiivvvveeee (((()))) ccccoooonnnnsssstttt
-
-
-
- Page 1 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- vvvvooooiiiidddd ccccoooonnnnvvvveeeerrrrttttTTTTooooAAAAbbbbssss (((())))
- bbbboooooooollll ooooppppeeeerrrraaaattttoooorrrr======== (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& )))) ccccoooonnnnsssstttt
- bbbboooooooollll ooooppppeeeerrrraaaattttoooorrrr!!!!==== (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& )))) ccccoooonnnnsssstttt
- bbbboooooooollll rrrreeeemmmmoooovvvveeee (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _f_i_l_e_N_a_m_e,,,, bbbboooooooollll _a_c_c_e_p_t_A_b_s_P_a_t_h ====
- TTTTRRRRUUUUEEEE ))))
- bbbboooooooollll rrrreeeennnnaaaammmmeeee (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _n_a_m_e,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _n_e_w_N_a_m_e,,,, bbbboooooooollll
- _a_c_c_e_p_t_A_b_s_P_a_t_h_s
- bbbboooooooollll eeeexxxxiiiissssttttssss (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _n_a_m_e,,,, bbbboooooooollll _a_c_c_e_p_t_A_b_s_P_a_t_h ==== TTTTRRRRUUUUEEEE ))))
-
- SSSSttttaaaattttiiiicccc PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
- QQQQSSSSttttrrrriiiinnnngggg ccccoooonnnnvvvveeeerrrrttttSSSSeeeeppppaaaarrrraaaattttoooorrrrssss (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhhNNNNaaaammmmeeee ))))
- ccccoooonnnnsssstttt QQQQFFFFiiiilllleeeeIIIInnnnffffooooLLLLiiiisssstttt**** ddddrrrriiiivvvveeeessss (((())))
- cccchhhhaaaarrrr sssseeeeppppaaaarrrraaaattttoooorrrr (((())))
- bbbboooooooollll sssseeeettttCCCCuuuurrrrrrrreeeennnntttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh ))))
- QQQQDDDDiiiirrrr ccccuuuurrrrrrrreeeennnntttt (((())))
- QQQQDDDDiiiirrrr hhhhoooommmmeeee (((())))
- QQQQDDDDiiiirrrr rrrrooooooootttt (((())))
- QQQQSSSSttttrrrriiiinnnngggg ccccuuuurrrrrrrreeeennnnttttDDDDiiiirrrrPPPPaaaatttthhhh (((())))
- QQQQSSSSttttrrrriiiinnnngggg hhhhoooommmmeeeeDDDDiiiirrrrPPPPaaaatttthhhh (((())))
- QQQQSSSSttttrrrriiiinnnngggg rrrroooooooottttDDDDiiiirrrrPPPPaaaatttthhhh (((())))
- bbbboooooooollll mmmmaaaattttcccchhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _f_i_l_t_e_r,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffiiiilllleeeeNNNNaaaammmmeeee ))))
- QQQQSSSSttttrrrriiiinnnngggg cccclllleeeeaaaannnnDDDDiiiirrrrPPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ddddiiiirrrrPPPPaaaatttthhhh ))))
- bbbboooooooollll iiiissssRRRReeeellllaaaattttiiiivvvveeeePPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh ))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Traverses directory structures and contents in a platform-
- independent way.
-
- A QDir can point to a file using either a relative or an
- absolute file path. Absolute file paths begin with the
- directory separator ('/') or a drive specification (not
- applicable to UNIX). Relative file names begin with a
- directory name or a file name and specify a path relative to
- the current directory.
-
- An example of an absolute path is the string "/tmp/quartz",
- a relative path might look like "src/fatlib". You can use
- the function isRelative() to check if a QDir is using a
- relative or an absolute file path. You can call the function
- convertToAbs() to convert a relative QDir to an absolute
- one.
-
- The directory "example" under the current directory is
- checked for existence in the example below:
-
- QDir d( "example" ); // "./example"
- if ( !d.exists() )
- warning( "Cannot find the example directory" );
-
- If you always use '/' as a directory separator, Qt will
- translate your paths to conform to the underlying operating
- system.
-
-
-
- Page 2 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- cd() and cdUp() can be used to navigate the directory tree.
- Note that the logical cd and cdUp operations are not
- performed if the new directory does not exist.
-
- Example:
-
- QDir d = QDir::root(); // "/"
- if ( !d.cd("tmp") ) { // "/tmp"
- warning( "Cannot find the \"/tmp\" directory" );
- } else {
- QFile f( d.filePath("ex1.txt") ); // "/tmp/ex1.txt"
- if ( !f.open(IO_ReadWrite) )
- warning( "Cannot create the file %s", f.name() );
- }
-
- To read the contents of a directory you can use the
- entryList() and entryInfoList() functions.
-
- Example:
-
- #include <stdio.h>
- #include <qdir.h>
- //
- // This program scans the current directory and lists all files
- // that are not symbolic links, sorted by size with the smallest files
- // first.
- //
- int main( int argc, char **argv )
- {
- QDir d;
- d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks );
- d.setSorting( QDir::Size | QDir::Reversed );
- const QFileInfoList *list = d.entryInfoList();
- QFileInfoListIterator it( *list ); // create list iterator
- QFileInfo *fi; // pointer for traversing
- printf( " BYTES FILENAME\n" ); // print header
- while ( (fi=it.current()) ) { // for each file...
- printf( "%10li %s\n", fi->size(), fi->fileName().data() );
- ++it; // goto next list element
- }
- }
-
- Examples: dirview/dirview.cpp
-
- MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- QQQQDDDDiiiirrrr::::::::QQQQDDDDiiiirrrr (((())))
- Constructs a QDir pointing to the current directory.
-
- See also: currentDirPath().
-
- QQQQDDDDiiiirrrr::::::::QQQQDDDDiiiirrrr (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& dddd ))))
- Constructs a QDir that is a copy of the given directory.
-
-
-
- Page 3 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- See also: operator=().
-
- QQQQDDDDiiiirrrr::::::::QQQQDDDDiiiirrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeeeFFFFiiiilllltttteeeerrrr ==== 0000,,,, iiiinnnntttt
- ssssoooorrrrttttSSSSppppeeeecccc ==== NNNNaaaammmmeeee |||| IIIIggggnnnnoooorrrreeeeCCCCaaaasssseeee,,,, iiiinnnntttt ffffiiiilllltttteeeerrrrSSSSppppeeeecccc ==== AAAAllllllll ))))
- Constructs a QDir.
-
- Arguments:
-
- _p_a_t_h is the directory.
-
- _n_a_m_e_F_i_l_t_e_r is the file name filter.
-
- the files in the directory.
- _s_o_r_t_S_p_e_c is the sort specification, which describes how to sort
-
- filter the files in the directory. Most of these arguments
- (except _p_a_t_h) have optional values.
- _f_i_l_t_e_r_S_p_e_c is the filter specification, which describes how to
-
- Example:
-
- // lists all files in /tmp
- QDir d( "/tmp" );
- for ( int i=0; i<d.count(); i++ )
- printf( "%s\n", d[i] );
-
- If _p_a_t_h is "" or null, the directory is set to "." (the
- current directory). If _n_a_m_e_F_i_l_t_e_r is "" or null, it is set
- to "*" (all files).
-
- No check is made to ensure that the directory exists.
-
- See also: exists(), setPath(), setNameFilter(), setFilter()
- and setSorting().
-
- QQQQDDDDiiiirrrr::::::::~~~~QQQQDDDDiiiirrrr (((())))
- Destroys the QDir and cleans up.
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::aaaabbbbssssFFFFiiiilllleeeePPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffiiiilllleeeeNNNNaaaammmmeeee,,,, bbbboooooooollll
- aaaacccccccceeeeppppttttAAAAbbbbssssPPPPaaaatttthhhh ==== TTTTRRRRUUUUEEEE )))) ccccoooonnnnsssstttt
- Returns the absolute path name of a file in the directory.
- Does NOT check if the file actually exists in the directory.
- Redundant multiple separators or "." and ".." directories in
- _f_i_l_e_N_a_m_e will NOT be removed (see cleanDirPath()).
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h is TRUE a _f_i_l_e_N_a_m_e starting with a
- separator ('/') will be returned without change. if
- _a_c_c_e_p_t_A_b_s_P_a_t_h is FALSE an absolute path will be appended to
- the directory path.
-
- See also: filePath().
-
-
-
-
- Page 4 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::aaaabbbbssssPPPPaaaatttthhhh (((()))) ccccoooonnnnsssstttt
- Returns the absolute (a path that starts with '/') path,
- which may contain symbolic links, but never contains
- redundant ".", ".." or multiple separators.
-
- See also: setPath(), canonicalPath(), exists(),
- cleanDirPath(), dirName() and absFilePath().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::ccccaaaannnnoooonnnniiiiccccaaaallllPPPPaaaatttthhhh (((()))) ccccoooonnnnsssstttt
- Returns the canonical path, i.e. a path without symbolic
- links.
-
- On systems that do not have symbolic links this function
- will always return the same string that absPath returns. If
- the canonical path does not exist a null string is returned.
-
- See also: path(), absPath(), exists(), cleanDirPath(),
- dirName(), absFilePath() and QString::isNull().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::ccccdddd (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ddddiiiirrrrNNNNaaaammmmeeee,,,, bbbboooooooollll aaaacccccccceeeeppppttttAAAAbbbbssssPPPPaaaatttthhhh ==== TTTTRRRRUUUUEEEE ))))
- Changes directory by descending into the given directory.
- Returns TRUE if the new directory exists and is readable.
- Note that the logical cd operation is NOT performed if the
- new directory does not exist.
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h is TRUE a path starting with a separator
- ('/') will cd to the absolute directory, if _a_c_c_e_p_t_A_b_s_P_a_t_h is
- FALSE any number of separators at the beginning of _d_i_r_N_a_m_e
- will be removed.
-
- Example:
-
- QDir d = QDir::home(); // now points to home directory
- if ( !d.cd("c++") ) { // now points to "c++" under home directory if OK
- QFileInfo fi( d, "c++" );
- if ( fi.exists() ) {
- if ( fi.isDir() )
- warning( "Cannot cd into \"%s\".", (char*)d.absFilePath("c++") );
- else
- warning( "Cannot create directory \"%s\"\n"
- "A file named \"c++\" already exists in \"%s\"",
- (const char *)d.absFilePath("c++"),
- (const char *)d.path() );
- return;
- } else {
- warning( "Creating directory \"%s\"",
- (const char *) d.absFilePath("c++") );
- if ( !d.mkdir( "c++" ) ) {
- warning("Could not create directory \"%s\"",
- (const char *)d.absFilePath("c++") );
- return;
- }
-
-
-
- Page 5 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- }
- }
-
- Calling cd( ".." ) is equivalent to calling cdUp().
-
- See also: cdUp(), isReadable(), exists() and path().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::ccccddddUUUUpppp (((())))
- Changes directory by moving one directory up the path
- followed to arrive at the current directory.
-
- Returns TRUE if the new directory exists and is readable.
- Note that the logical cdUp() operation is not performed if
- the new directory does not exist.
-
- See also: cd(), isReadable(), exists() and path().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::cccclllleeeeaaaannnnDDDDiiiirrrrPPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffiiiilllleeeePPPPaaaatttthhhh )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Removes all multiple directory separators ('/') and resolves
- any "." or ".." found in the path.
-
- Symbolic links are kept. This function does not return the
- canonical path.
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::ccccoooonnnnvvvveeeerrrrttttSSSSeeeeppppaaaarrrraaaattttoooorrrrssss (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhhNNNNaaaammmmeeee ))))
- [[[[ssssttttaaaattttiiiicccc]]]]
- Converts the '/' separators in _p_a_t_h_N_a_m_e to system native
- separators. Returns the translated string.
-
- On Windows, convertSeparators("c:/winnt/system32") returns
- "c:\winnt\system32".
-
- No conversion is done on UNIX.
-
- vvvvooooiiiidddd QQQQDDDDiiiirrrr::::::::ccccoooonnnnvvvveeeerrrrttttTTTTooooAAAAbbbbssss (((())))
- Converts the directory path to an absolute path. If it is
- already absolute nothing is done.
-
- See also: isRelative().
-
- uuuuiiiinnnntttt QQQQDDDDiiiirrrr::::::::ccccoooouuuunnnntttt (((()))) ccccoooonnnnsssstttt
- Returns the number of files that was found. Equivalent to
- entryList()->count().
-
- See also: operator[] and entryList().
-
- QQQQDDDDiiiirrrr QQQQDDDDiiiirrrr::::::::ccccuuuurrrrrrrreeeennnntttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the current directory.
-
- See also: currentDirPath() and QDir::QDir().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::ccccuuuurrrrrrrreeeennnnttttDDDDiiiirrrrPPPPaaaatttthhhh (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
-
-
-
- PPPPaaaaggggeeee 6666 ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- Returns the absolute path of the current directory.
-
- See also: current().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::ddddiiiirrrrNNNNaaaammmmeeee (((()))) ccccoooonnnnsssstttt
- Returns the name of the directory, this is NOT the same as
- the path, e.g. a directory with the name "mail", might have
- the path "/var/spool/mail". If the directory has no name
- (e.g. the root directory) a null string is returned.
-
- No check is made to ensure that a directory with this name
- actually exists.
-
- See also: path(), absPath(), absFilePath(), exists() and
- QString::isNull().
-
- ccccoooonnnnsssstttt QQQQFFFFiiiilllleeeeIIIInnnnffffooooLLLLiiiisssstttt **** QQQQDDDDiiiirrrr::::::::ddddrrrriiiivvvveeeessss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns a list if the root directories on this system. On
- win32, this returns a number of QFileInfo objects containing
- "C:/", "D:/" etc. On other operating systems, it returns a
- list containing just one root directory (e.g. "/").
-
- ccccoooonnnnsssstttt QQQQFFFFiiiilllleeeeIIIInnnnffffooooLLLLiiiisssstttt **** QQQQDDDDiiiirrrr::::::::eeeennnnttttrrrryyyyIIIInnnnffffooooLLLLiiiisssstttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr ****
- nnnnaaaammmmeeeeFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt ffffiiiilllltttteeeerrrrSSSSppppeeeecccc ==== DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt ssssoooorrrrttttSSSSppppeeeecccc ====
- DDDDeeeeffffaaaauuuullllttttSSSSoooorrrrtttt )))) ccccoooonnnnsssstttt
- Returns a list of QFileInfo objects for all files and
- directories in the directory pointed to using the
- setSorting(), setFilter() and setNameFilter()
- specifications.
-
- The the filter and sorting specifications can be overridden
- using the _n_a_m_e_F_i_l_t_e_r, _f_i_l_t_e_r_S_p_e_c and _s_o_r_t_S_p_e_c arguments.
-
- Returns 0 if the directory is unreadable or does not exist.
-
- See also: entryList(), setNameFilter(), setSorting() and
- setFilter().
-
- ccccoooonnnnsssstttt QQQQFFFFiiiilllleeeeIIIInnnnffffooooLLLLiiiisssstttt **** QQQQDDDDiiiirrrr::::::::eeeennnnttttrrrryyyyIIIInnnnffffooooLLLLiiiisssstttt (((( iiiinnnntttt ffffiiiilllltttteeeerrrrSSSSppppeeeecccc ====
- DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt ssssoooorrrrttttSSSSppppeeeecccc ==== DDDDeeeeffffaaaauuuullllttttSSSSoooorrrrtttt )))) ccccoooonnnnsssstttt
- Returns a list of QFileInfo objects for all files and
- directories in the directory pointed to using the
- setSorting(), setFilter() and setNameFilter()
- specifications.
-
- The the filter and sorting specifications can be overridden
- using the _f_i_l_t_e_r_S_p_e_c and _s_o_r_t_S_p_e_c arguments.
-
- Returns 0 if the directory is unreadable or does not exist.
-
- See also: entryList(), setNameFilter(), setSorting() and
- setFilter().
-
-
-
- Page 7 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- Examples: dirview/dirview.cpp
-
- ccccoooonnnnsssstttt QQQQSSSSttttrrrrLLLLiiiisssstttt **** QQQQDDDDiiiirrrr::::::::eeeennnnttttrrrryyyyLLLLiiiisssstttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeeeFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt
- ffffiiiilllltttteeeerrrrSSSSppppeeeecccc ==== DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt ssssoooorrrrttttSSSSppppeeeecccc ==== DDDDeeeeffffaaaauuuullllttttSSSSoooorrrrtttt ))))
- ccccoooonnnnsssstttt
- Returns a list of the names of all files and directories in
- the directory pointed to using the setSorting(), setFilter()
- and setNameFilter() specifications.
-
- The the filter and sorting specifications can be overridden
- using the _n_a_m_e_F_i_l_t_e_r, _f_i_l_t_e_r_S_p_e_c and _s_o_r_t_S_p_e_c arguments.
-
- Returns 0 if the directory is unreadable or does not exist.
-
- See also: entryInfoList(), setNameFilter(), setSorting() and
- setFilter().
-
- ccccoooonnnnsssstttt QQQQSSSSttttrrrrLLLLiiiisssstttt **** QQQQDDDDiiiirrrr::::::::eeeennnnttttrrrryyyyLLLLiiiisssstttt (((( iiiinnnntttt ffffiiiilllltttteeeerrrrSSSSppppeeeecccc ====
- DDDDeeeeffffaaaauuuullllttttFFFFiiiilllltttteeeerrrr,,,, iiiinnnntttt ssssoooorrrrttttSSSSppppeeeecccc ==== DDDDeeeeffffaaaauuuullllttttSSSSoooorrrrtttt )))) ccccoooonnnnsssstttt
- Returns a list of the names of all files and directories in
- the directory pointed to using the setSorting(), setFilter()
- and setNameFilter() specifications.
-
- The the filter and sorting specifications can be overridden
- using the _f_i_l_t_e_r_S_p_e_c and _s_o_r_t_S_p_e_c arguments.
-
- Returns 0 if the directory is unreadable or does not exist.
-
- See also: entryInfoList(), setNameFilter(), setSorting() and
- setFilter().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::eeeexxxxiiiissssttttssss (((()))) ccccoooonnnnsssstttt
- Returns TRUE if the directory exists. (If a file with the
- same name is found this function will of course return
- FALSE).
-
- See also: QFileInfo::exists() and QFile::exists().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::eeeexxxxiiiissssttttssss (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeee,,,, bbbboooooooollll aaaacccccccceeeeppppttttAAAAbbbbssssPPPPaaaatttthhhh ==== TTTTRRRRUUUUEEEE
- ))))
- Checks for existence of a file.
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h_s is TRUE a path starting with a separator
- ('/') will check the file with the absolute path, if
- _a_c_c_e_p_t_A_b_s_P_a_t_h is FALSE any number of separators at the
- beginning of _n_a_m_e will be removed.
-
- Returns TRUE if the file exists, otherwise FALSE.
-
- See also: QFileInfo::exists() and QFile::exists().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::ffffiiiilllleeeePPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffiiiilllleeeeNNNNaaaammmmeeee,,,, bbbboooooooollll
-
-
-
- PPPPaaaaggggeeee 8888 ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- acceptAbsPath = TRUE ) const
- Returns the path name of a file in the directory. Does NOT
- check if the file actually exists in the directory. If the
- QDir is relative the returned path name will also be
- relative. Redundant multiple separators or "." and ".."
- directories in _f_i_l_e_N_a_m_e will not be removed (see
- cleanDirPath()).
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h is TRUE a _f_i_l_e_N_a_m_e starting with a
- separator ('/') will be returned without change. If
- _a_c_c_e_p_t_A_b_s_P_a_t_h is FALSE an absolute path will be appended to
- the directory path.
-
- See also: absFilePath(), isRelative() and canonicalPath().
-
- QQQQDDDDiiiirrrr::::::::FFFFiiiilllltttteeeerrrrSSSSppppeeeecccc QQQQDDDDiiiirrrr::::::::ffffiiiilllltttteeeerrrr(((()))) ccccoooonnnnsssstttt
- Returns the value set by setFilter()
-
- See also: setFilter().
-
- QQQQDDDDiiiirrrr QQQQDDDDiiiirrrr::::::::hhhhoooommmmeeee (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the home directory.
-
- See also: homeDirPath().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::hhhhoooommmmeeeeDDDDiiiirrrrPPPPaaaatttthhhh (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the absolute path for the user's home directory,
-
- See also: home().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::iiiissssRRRReeeeaaaaddddaaaabbbblllleeee (((()))) ccccoooonnnnsssstttt
- Returns TRUE if the directory is readable AND we can open
- files by name. This function will return FALSE if only one
- of these is present.
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: A FALSE value from this function is not a guarantee
- that files in the directory are not accessible.
-
- See also: QFileInfo::isReadable().
-
- Examples: dirview/dirview.cpp
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::iiiissssRRRReeeellllaaaattttiiiivvvveeee (((()))) ccccoooonnnnsssstttt
- Returns TRUE if the directory path is relative to the
- current directory, FALSE if the path is absolute (e.g. under
- UNIX a path is relative if it does not start with a '/').
-
- According to Einstein this function should always return
- TRUE.
-
- See also: convertToAbs().
-
-
-
-
- Page 9 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::iiiissssRRRReeeellllaaaattttiiiivvvveeeePPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns TRUE if the path is relative, FALSE if it is
- absolute.
-
- See also: isRelative().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::iiiissssRRRRooooooootttt (((()))) ccccoooonnnnsssstttt
- Returns TRUE if the directory is the root directory,
- otherwise FALSE.
-
- Note: If the directory is a symbolic link to the root
- directory this function returns FALSE. If you want to test
- for this you can use canonicalPath():
-
- Example:
-
- QDir d( "/tmp/root_link" );
- d = d.canonicalPath();
- if ( d.isRoot() )
- warning( "It IS a root link!" );
-
- See also: root() and rootDirPath().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::mmmmaaaattttcccchhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffiiiilllltttteeeerrrr,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffiiiilllleeeeNNNNaaaammmmeeee ))))
- [[[[ssssttttaaaattttiiiicccc]]]]
- Returns TRUE if the _f_i_l_e_N_a_m_e matches the wildcard _f_i_l_t_e_r.
-
- See also: QRegExp.
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::mmmmaaaattttcccchhhhAAAAllllllllDDDDiiiirrrrssss (((()))) ccccoooonnnnsssstttt
- Returns the value set by setMatchAllDirs()
-
- See also: setMatchAllDirs().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::mmmmkkkkddddiiiirrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ddddiiiirrrrNNNNaaaammmmeeee,,,, bbbboooooooollll aaaacccccccceeeeppppttttAAAAbbbbssssPPPPaaaatttthhhh ====
- TTTTRRRRUUUUEEEE )))) ccccoooonnnnsssstttt
- Creates a directory.
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h is TRUE a path starting with a separator
- ('/') will create the absolute directory, if _a_c_c_e_p_t_A_b_s_P_a_t_h
- is FALSE any number of separators at the beginning of
- _d_i_r_N_a_m_e will be removed.
-
- Returns TRUE if successful, otherwise FALSE.
-
- See also: rmdir().
-
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** QQQQDDDDiiiirrrr::::::::nnnnaaaammmmeeeeFFFFiiiilllltttteeeerrrr (((()))) ccccoooonnnnsssstttt
- Returns the string set by setNameFilter()
-
- See also: setNameFilter().
-
-
-
-
- Page 10 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::ooooppppeeeerrrraaaattttoooorrrr!!!!==== (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& dddd )))) ccccoooonnnnsssstttt
- Returns TRUE if the _d and this dir havee different path or
- different sort/filter settings, otherwise FALSE.
-
- QQQQDDDDiiiirrrr &&&& QQQQDDDDiiiirrrr::::::::ooooppppeeeerrrraaaattttoooorrrr==== (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& dddd ))))
- Makes a copy of d and assigns it to this QDir.
-
- QQQQDDDDiiiirrrr &&&& QQQQDDDDiiiirrrr::::::::ooooppppeeeerrrraaaattttoooorrrr==== (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh ))))
- Sets the directory path to be the given path.
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::ooooppppeeeerrrraaaattttoooorrrr======== (((( ccccoooonnnnsssstttt QQQQDDDDiiiirrrr &&&& dddd )))) ccccoooonnnnsssstttt
- Returns TRUE if the _d and this dir have the same path and
- all sort and filter settings are equal, otherwise FALSE.
-
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** QQQQDDDDiiiirrrr::::::::ooooppppeeeerrrraaaattttoooorrrr[[[[]]]] (((( iiiinnnntttt iiiinnnnddddeeeexxxx )))) ccccoooonnnnsssstttt
- Returns the file name at position _i_n_d_e_x in the list of found
- file names. Equivalent to entryList()->at(index).
-
- Returns null if the _i_n_d_e_x is out of range or if the
- entryList() function failed.
-
- See also: count() and entryList().
-
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** QQQQDDDDiiiirrrr::::::::ppppaaaatttthhhh (((()))) ccccoooonnnnsssstttt
- Returns the path, this may contain symbolic links, but never
- contains redundant ".", ".." or multiple separators.
-
- The returned path can be either absolute or relative (see
- setPath()).
-
- See also: setPath(), absPath(), exists(), cleanDirPath(),
- dirName(), absFilePath() and convertSeparators().
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::rrrreeeemmmmoooovvvveeee (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffiiiilllleeeeNNNNaaaammmmeeee,,,, bbbboooooooollll aaaacccccccceeeeppppttttAAAAbbbbssssPPPPaaaatttthhhh ====
- TTTTRRRRUUUUEEEE ))))
- Removes a file.
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h is TRUE a path starting with a separator
- ('/') will remove the file with the absolute path, if
- _a_c_c_e_p_t_A_b_s_P_a_t_h is FALSE any number of separators at the
- beginning of _f_i_l_e_N_a_m_e will be removed.
-
- Returns TRUE if successful, otherwise FALSE.
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::rrrreeeennnnaaaammmmeeee (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeee,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnneeeewwwwNNNNaaaammmmeeee,,,, bbbboooooooollll
- aaaacccccccceeeeppppttttAAAAbbbbssssPPPPaaaatttthhhhssss ==== TTTTRRRRUUUUEEEE ))))
- Renames a file.
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h_s is TRUE a path starting with a separator
- ('/') will rename the file with the absolute path, if
- _a_c_c_e_p_t_A_b_s_P_a_t_h is FALSE any number of separators at the
- beginning of _n_a_m_e will be removed.
-
-
-
- Page 11 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- Returns TRUE if successful, otherwise FALSE.
-
- On most file systems, rename() fails only if oldName does
- not exist or if _n_e_w_N_a_m_e and _o_l_d_N_a_m_e are not on the same
- partition, but there are also other reasons why rename() can
- fail. For example, on at least one file system rename()
- fails if newName points to an open file.
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::rrrrmmmmddddiiiirrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ddddiiiirrrrNNNNaaaammmmeeee,,,, bbbboooooooollll aaaacccccccceeeeppppttttAAAAbbbbssssPPPPaaaatttthhhh ====
- TTTTRRRRUUUUEEEE )))) ccccoooonnnnsssstttt
- Removes a directory.
-
- If _a_c_c_e_p_t_A_b_s_P_a_t_h is TRUE a path starting with a separator
- ('/') will remove the absolute directory, if _a_c_c_e_p_t_A_b_s_P_a_t_h
- is FALSE any number of separators at the beginning of
- _d_i_r_N_a_m_e will be removed.
-
- The directory must be empty for rmdir() to succeed.
-
- Returns TRUE if successful, otherwise FALSE.
-
- See also: mkdir().
-
- QQQQDDDDiiiirrrr QQQQDDDDiiiirrrr::::::::rrrrooooooootttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the root directory.
-
- See also: rootDirPath() and drives().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQDDDDiiiirrrr::::::::rrrroooooooottttDDDDiiiirrrrPPPPaaaatttthhhh (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the absolute path for the root directory ("/" under
- UNIX).
-
- See also: root() and drives().
-
- cccchhhhaaaarrrr QQQQDDDDiiiirrrr::::::::sssseeeeppppaaaarrrraaaattttoooorrrr (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the native directory separator; '/' under UNIX and
- '\' under MS-DOS, Windows NT and OS/2.
-
- You do not need to use this function to build file paths. If
- you always use '/', Qt will translate your paths to conform
- to the underlying operating system.
-
- bbbboooooooollll QQQQDDDDiiiirrrr::::::::sssseeeettttCCCCuuuurrrrrrrreeeennnntttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sets the the current directory. Returns TRUE if successful.
-
- vvvvooooiiiidddd QQQQDDDDiiiirrrr::::::::sssseeeettttFFFFiiiilllltttteeeerrrr (((( iiiinnnntttt ffffiiiilllltttteeeerrrrSSSSppppeeeecccc ))))
- Sets the filter used by entryList() and entryInfoList(). The
- filter is used to specify the kind of files that should be
- returned by entryList() and entryInfoList(). The filter is
- specified by or-ing values from the enum FilterSpec. The
- different values are:
-
-
-
-
- Page 12 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- Dirs
- List directories only.
-
- Files
- List files only.
-
- Drives
- List drives.
-
- NoSymLinks
- Do not list symbolic links.
-
- Readable
- List files with read permission.
-
- Writable
- List files with write permission.
-
- Executable
- List files with execute permission.
-
- Setting none of the three flags above is equivalent to
- setting all of them.
-
- Modified
- Only list files that have been modified (does nothing
- under UNIX).
-
- Hidden
- List hidden files also (.* under UNIX).
-
- System
- List system files (does nothing under UNIX).
-
- See also: nameFilter().
-
- vvvvooooiiiidddd QQQQDDDDiiiirrrr::::::::sssseeeettttMMMMaaaattttcccchhhhAAAAllllllllDDDDiiiirrrrssss (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- If _e_n_a_b_l_e is TRUE, all directories will be listed (even if
- they do not match the filter or the name filter), otherwise
- only matched directories will be listed.
-
- See also: matchAllDirs().
-
- Bugs and limitations:
-
- included (the name filter will be ignored as expected).
- Currently, directories that do not match the filter will not be
-
- vvvvooooiiiidddd QQQQDDDDiiiirrrr::::::::sssseeeettttNNNNaaaammmmeeeeFFFFiiiilllltttteeeerrrr (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeeeFFFFiiiilllltttteeeerrrr ))))
- Sets the name filter used by entryList() and
- entryInfoList().
-
-
-
-
- Page 13 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- The name filter is a wildcarding filter that understands "*"
- and "?" wildcards, if you want entryList() and
- entryInfoList() to list all files ending with ".cpp", you
- simply call dir.setNameFilter("*.cpp");
-
- See also: nameFilter().
-
- vvvvooooiiiidddd QQQQDDDDiiiirrrr::::::::sssseeeettttPPPPaaaatttthhhh (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ppppaaaatttthhhh ))))
- Sets the path of the directory. The path is cleaned of
- redundant ".", ".." and multiple separators. No check is
- made to ensure that a directory with this path exists.
-
- The path can be either absolute or relative. Absolute paths
- begin with the directory separator ('/') or a drive
- specification (not applicable to UNIX). Relative file names
- begin with a directory name or a file name and specify a
- path relative to the current directory. An example of an
- absolute path is the string "/tmp/quartz", a relative path
- might look like "src/fatlib". You can use the function
- isRelative() to check if a QDir is using a relative or an
- absolute file path. You can call the function convert
- ToAbs() to convert a relative QDir to an absolute one.
-
- See also: path(), absPath(), exists, cleanDirPath(),
- dirName(), absFilePath(), isRelative() and convertToAbs().
-
- vvvvooooiiiidddd QQQQDDDDiiiirrrr::::::::sssseeeettttSSSSoooorrrrttttiiiinnnngggg (((( iiiinnnntttt ssssoooorrrrttttSSSSppppeeeecccc ))))
- Sets the sorting order used by entryList() and
- entryInfoList().
-
- The _s_o_r_t_S_p_e_c is specified by or-ing values from the enum
- SortSpec. The different values are:
-
- One of these:
-
- Name
- Sort by name (alphabetical order).
-
- Time
- Sort by time (most recent first).
-
- Size
- Sort by size (largest first).
-
- Unsorted
- Use the operating system order (UNIX does NOT sort
- alphabetically).
-
- ORed with zero or more of these:
-
- DirsFirst
- Always put directory names first.
-
-
-
- Page 14 (printed 9/22/98)
-
-
-
-
-
-
- QQQQDDDDiiiirrrr((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQDDDDiiiirrrr((((3333qqqqtttt))))
-
-
-
- Reversed
- Reverse sort order.
-
- IgnoreCase
- Ignore case when sorting by name.
-
- QQQQDDDDiiiirrrr::::::::SSSSoooorrrrttttSSSSppppeeeecccc QQQQDDDDiiiirrrr::::::::ssssoooorrrrttttiiiinnnngggg(((()))) ccccoooonnnnsssstttt
- Returns the value set by setSorting()
-
- See also: setSorting().
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- hhhhttttttttpppp::::////////wwwwwwwwwwww....ttttrrrroooollllllll....nnnnoooo////qqqqtttt////qqqqddddiiiirrrr....hhhhttttmmmmllll
-
- CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
- Copyright 1992-1997 Troll Tech AS. See the LICENSE file
- included in the distribution for a complete license
- statement.
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Generated automatically from the source code.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 15 (printed 9/22/98)
-
-
-
-